#include <stdio.h>
#include <string.h>
//测试出来，fgets最后一个位置永远是‘\0’

#define MAXLINE 10

int main(){
    int count = 0;
    char buf[MAXLINE];
    while(fgets(buf, MAXLINE, stdin) != NULL){
        //printf("the len is %ld\n", strlen(buf));
        fputs(buf, stdout);
        count++;
    }
    printf("count is %d\n", count);
    return 0;
}